﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Faust.Andrew.MTG.Player
{
	/// <summary>
	/// Interaction logic for JoinGameConfigurationWindow.xaml
	/// </summary>
	public partial class JoinGameConfigurationWindow : Window
	{
		public JoinGameConfigurationWindow()
		{
			this.InitializeComponent();
			
			// Insert code required on object creation below this point.
		}

        public string Host
        {
            get { return joinConfiguration.Host; }
        }

        public int Port
        {
            get { return joinConfiguration.Port; }
        }

        public new string Name
        {
            get { return joinConfiguration.Name; }
        }

        public bool IsRejoin
        {
            get
            {
                return joinConfiguration.IsRejoin;
            }
        }

        public string DeckName
        {
            get { return joinConfiguration.DeckName; }
        }

        public List<string> Decks
        {
            set { joinConfiguration.Decks = value; }
        }
        

		private void btnOK_Click(object sender, System.Windows.RoutedEventArgs e)
		{
            if (joinConfiguration.Validate())
            {
                DialogResult = true;
                Close();
            }
		}

		private void btnCancel_Click(object sender, System.Windows.RoutedEventArgs e)
		{
            DialogResult = false;
            Close();
		}
	}
}